//
//  UIImageView+CYExtension.m
//  DDSocial
//
//  Created by 阿帕 on 2018/7/6.
//  Copyright © 2018年 XY. All rights reserved.
//

#import "UIImageView+CYExtension.h"
#import "UIImage+CYCircle.h"
#import <UIImageView+WebCache.h>

@implementation UIImageView (CYExtension)

- (void)dc_setHeader:(NSString *)url
{
    WEAKSELF;
    [self sd_setImageWithURL:[NSURL URLWithString:url] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        weakSelf.image = image ?[image cy_circleImage] : nil;
    }];
}

@end
